package com.jerry.basic.thread;

public class HelloThreadSleepRun implements Runnable {
	/*
	 * 线程的休眠
	 */
	 public void run() {
	        for (int i = 0; i < 3; i++) {
	            try {
	                Thread.sleep(2000);
	            } catch (Exception e) {
	                e.printStackTrace();
	            }
	            System.out.println(Thread.currentThread().getName() + i);
	        }
	    }
	 
	    public static void main(String[] args) {
	    	HelloThreadSleepRun he = new HelloThreadSleepRun();
	        Thread demo = new Thread(he, "Thread ");
	        demo.start();
	    }
}
